//
//  InputProcessor.h
//  Soccer
//
//  Created by Hyun-Woong Kim on 09. 05. 01.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MovableObject.h"
#import "Player.h"
#import "Ball.h"

// 사용자의 입력을 분석하는 class
// strategy pattern이 어울릴 것 같음
@interface InputProcessor : NSObject <UIAccelerometerDelegate> {
	// a controlled player
	Player *player;
	Ball *ball;
	CGPoint lastLocation;
}

//+ (InputProcessor *)sharedInputProcessor;

@property(readwrite,retain) Player *player;
@property(readwrite,retain) Ball *ball;

// touch
- (void)touchBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchCanceled:(NSSet *)touches withEvent:(UIEvent *)event;

// accelerometer
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;


@end
